package xing.domain.page;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;

@Entity
@Table(name="page_content_item")
public class PageContentItem implements Serializable {
  private static final long serialVersionUID = 8756864450681201700L;
  private Long id;
  private String title;
  private String target;
  private String imageurl;
  private String type;
  private String size;
  private String companycode;
  private Timestamp created;
  private Timestamp updated;

  public PageContentItem(){ }

  public PageContentItem(Long id, String title, String target, String imageurl, String type, String companycode, Timestamp created,Timestamp updated) {
    this.id = id;
    this.title = title;
    this.target = target;
    this.imageurl = imageurl;
    this.type = type;
    this.companycode = companycode;
    this.created = created;
    this.updated = updated;
  }

  public Timestamp getUpdated() {
    return updated;
  }

  public void setUpdated(Timestamp updated) {
    this.updated = updated;
  }

  public String getSize() {
    return size;
  }

  public void setSize(String size) {
    this.size = size;
  }


  @Id
  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public String getTarget() {
    return target;
  }

  public void setTarget(String target) {
    this.target = target;
  }

  public String getImageurl() {
    return imageurl;
  }

  public void setImageurl(String imageurl) {
    this.imageurl = imageurl;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getCompanycode() {
    return companycode;
  }

  public void setCompanycode(String companycode) {
    this.companycode = companycode;
  }

  public java.sql.Timestamp getCreated() {
    return created;
  }

  public void setCreated(java.sql.Timestamp created) {
    this.created = created;
  }

  @Override
  public int hashCode() {
    return this.id.hashCode();
  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof PageContentItem) {
      PageContentItem pageContentItem = (PageContentItem) obj;
      return (this.id.equals(pageContentItem.id));
    }
    return super.equals(obj);
  }
}
